package com.group.flagtivities;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class RSVPOpenHelper extends SQLiteOpenHelper {
	
	private static final String DATABASE_NAME = "rsvp.db";
	private static final String TABLE_NAME = "rsvp";
	private static final String TABLE_CREATE = "CREATE TABLE " + TABLE_NAME + " ( _id integer primary key autoincrement, user_id integer, activity_id integer);";
	private static final int DATABASE_VERSION = 1;
	
	
	public RSVPOpenHelper(Context context) {
		super(context, DATABASE_NAME, null, DATABASE_VERSION);
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		db.execSQL(TABLE_CREATE);
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		db.execSQL("DROP TABLE IF EXISTS " + DATABASE_VERSION);
		onCreate(db);
	}

}
